import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-06-22
 * Time: 19:19
 */
public class test {
    public static void main(String[] args) {
        int [] arr={10,20,30};
        change(arr);
        System.out.println("方法外"+Arrays.toString(arr));
        System.out.println(change(arr, 5));
    }

    private static void change(int[] arr) {
        System.out.println("方法内，未变化"+Arrays.toString(arr));
        arr[1]=22;
        System.out.println("方法内，已变化"+Arrays.toString(arr));
    }
    private static int change(int[] arr,int n){
        return n;
    }
}
